 
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../common.dart';

class market extends StatefulWidget {
  const market({super.key});

  @override
  State<market> createState() => _QGBannerWidgetState();
}
List<Map<String, String>> items =[
  {
    "txt":"全部",
    "img":"",
  },
  {
    "txt":"PFP",
    "img":"pfp",
  },
  {
    "txt":"农业",
    "img":"nongye",
  },
  {
    "txt":"科技",
    "img":"keji",
  },
  {
    "txt":"游戏",
    "img":"youxi",
  },
];
 List<Map<String, String>> tabItems=[
  {"text":"涨幅最大","img":"zhanghu","imgs":"zhanghus"},
  {"text":"热门藏品","img":"remen","imgs":"remens"},
  {"text":"本周上新","img":"benzhou","imgs":"benzhous"},
];
int tabIndex = 0;

int tindex = 0;

 int carouseIndex = 0;
 List<Map<String, String>> announcementList=[
  {
  "text":"元宇宙创世计划——你的数字身份，从的数字身份",
 },{
  "text":"22 22s ds dfs，从的数字身份",
 },
 ];

 final List<String> imgList = [
    'aaa',
    'aaa',
    'aaa',
  ];



class _QGBannerWidgetState extends State<market> {
  @override
  Widget build(BuildContext context) {

  final totalw = MediaQuery.of(context).size.width/2-20;

    return 
     ListView(
      children: [
        Wrap(
              spacing: 10,
              runSpacing: 10,
              children: [
                GestureDetector(
                  onTap: (){
                    toNamed('/market/snap_up');
                  },
                  child: Container(
                  margin: EdgeInsets.only(top: 10),
                  child:  Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Stack(
                      children: [
                        wImage(url: 'aaa',width: totalw,height: 50,borderRadius: 10),
                        Positioned(
                          top: 10,
                          left: 10,
                          child: 
                        wImage(url: 'xiyou',width:56),
                        ),
                      ],
                    ),
                    SizedBox(height: 3,),
                    wText(text: '200m² 3D艺术展厅',size: 14,bold: true),
                    SizedBox(height: 2,),
                    wText(text: '已兑换200份',color: '878b95')
                  ],
                ),
                ),
                )
                ,
               
              ],
            )
      ],
     );
  }
}
